app.controller('ctrl',function ($scope) {

    //tab样式切换
    $('#footerBar li a').click(function () {
        $(this).addClass('index-footerOn').parent().siblings().find('a').removeClass('index-footerOn')
    })
    $('#shouye-headerBar li').click(function () {
        $(this).addClass('shouye-headerOn').siblings().removeClass('shouye-headerOn')
    })

    $('#me-oLike li').click(function () {
        $(this).addClass('me-mylikeOn').siblings().removeClass('me-mylikeOn')
    })

    /*
    * 点击喜欢点赞
    * likeNum、likeNum02、likeNum03... 等都为后台提供所有的喜欢的数量
    * */
    $scope.likeNum=88;
    $scope.likeNum02=120;
    $scope.likeNum03=48;
    $scope.likeNum04=98;
    $scope.likeNum05=105;
    $scope.likeNum06=58;
    $scope.likeNum07=79;
    $scope.likeNum08=66;
    $scope.ql=function ($event) {
        if($event.target.className=='fa fa-heart Tcolor'){
            var bbb=Number($event.currentTarget.nextSibling.nextSibling.innerText)-1
            $event.currentTarget.nextElementSibling.innerText=bbb
            $event.target.className='fa fa-heart-o'
        }else if($event.target.className=='fa fa-heart-o'){
            var aaa=Number($event.currentTarget.nextSibling.nextSibling.innerText)+1
            $event.currentTarget.nextElementSibling.innerText=aaa
            $event.target.className='fa fa-heart Tcolor'
        }
    }

})
